Added more control methods to profiler
Moved main stuff to an Application class