Refactor application configuration