Clenaed up code and formatting

Made so that code is easier to read