move application into own class