Make factories and tests work