Cleanup

Removed some unnecessary code
Added a test for editing a nonexistent page