change 404 and 500 pages message
minor fixes
included lib to manipulate URIs
manipulate URIs in controllers using lib