Moved application into a class