Fix form ownership and updated tests