fix various issues with Factory & FactorySQL
add .travis.yml file