Added a makefile and fixed some compilation issues with code.