Cleanup
Extracted some image functions, implemented naive level loading