Cleaned up imports, fixed resource leak

Turns out LevelEditor was leaking file handles all this time after
loading the editor data. Oh well, it's fixed now!