Fixed merging issues
Fixed issues to allow compile

Changed a few lines to make the program compile correctly
Merging fixes