Made Application object and simplified main()