Cleaned up code, removed commented sections