Signed / unsigned fixes and function prototypes