implemented lazy loading of views in the flask modules