cleanup and added stdbool.h