add save handler, refactor test view handler and comment pending test edit handler