cleanup
put in prototypes for 'shared' functions