refactor AbstractApplication