make addLoop and sceneChanged event driven and refactor to make more mvc
transition trace class
implement Trace class
refactor main loop into controller and fix compiler warnings