Added application class and some tests.