level loader and cleanup