added page handler and global config
Bug fixes