Add Factory classes and design pattern for parser and creating objects,
working version for point and line