Moved init_app out of main