Refactored to provide more complete factory mechanism
More factory clean up