Refactor the code in app.py. All helper functions should be moved to utils.py. All activity related functions should be moved to routers/activities.py