Changed to return type of the class method to id to remove the need to cast it back.