DW: Code refactor and added test for form not in a project