cleans up application class, adds comments