Cleaned up the code and commented everything