Restructuring views and routes