Rearranged code to be more transportable, i.e. one folder to add to a project that wants to use ZForm