Refactor
Implemented use of an Application object