Refactoried static_pages_helper.rb