Added proper preload API
Modified inital code for scene