Fixed a lot of minor issues. Code compiles