Moved the calling code into the application class.