Added basic factory method and tests