fixes for char/int conversion and a makefile