Added factories for controllers and views