minor cleanups and removal of duplicate prototypes