add more unit tests for form definer
lots of comments