Better PagesController, fixed bugs in libraries

also removed traits and advanced array notation, now the app runs on PHP
5.3