added Path, outsourced chainfactory, some fixes, added path example to example1