FormBehavior class bugfixes/refactor