move the main flask app to core module

this change provide modularity in all waliki. For example you can move the routes to their own file and import core to register the routes into the app