Moved all App code into App class