fixing some minor issues
moved config.h includes to header files, fixed whitespace issues