improve the way app class is built