[refactor] move application configuration code into a separate class so not everything has to be in application