Better error reporting for users
Now using regex

Will now filter queries to the correct pages instead of throwing an
error. Also added a 404 option.
Housekeeping
Now using models

Outsourcing some of the logic to other php files