Refactors Application to abstract common elements.