Restructured into views and models