Initial implementation of /edit handler