Add check for slug when editing page (fixes #119)
Improve JS behavior when editing slug (fixes #132)