include stdio.h to suppress printf warning, general warnings fixups