refactor pages controller
merge with balticit
Merge branch 'master' of github.com:balticit/template into bit2