Added factories and a fail() method