improvement in main view and sitecontroller