fixed most bugs, renamed application class