clean up code, fix scaled size load