Created main page controller