added Application class, with tests.