Cleanup the config file check

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Implement new Pages API and remove the old

The API for dealing with pages is now rewritten and moved into it's own
class called "Pages". The pages related methods from the Theme API are
now gone.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>