Added a PathFactory to create the path