Added basic factory functionality.