simplified and isolated the scopes' controllers. handle case when there are no form definitions.