Cleaned up some code for level loader