Moved application stuff to the framework