Cleaned up code

Removed a lot of commented out code and stopped it from throwing quite a
few (unnecessary) errors.