Changed factory methods to private
Parser code cleanup