moved update, display, mouse event, and image load functions to UIFunctions.js