restructure app and add routing