Made, loading of lenxt level, extracted some more functions.