restructuring of views and templates