Fixed a bunch of errors and bad coding. This is basically just an initial commit and cleaned up branch