Cleaned up some errors as well as file structure