modifications to build system and to main
makefile changes + merge conflict fixes and such