Added root :to => 'pages#main' in routes.rb