Added factory class back in