Merge pull request #1215 from seanpaultaylor/next

Code cleanup of ControlFactory.
Updated for ControlFactory