Cleaned up code

I just simplified most of the code and recreated it