adding latest changes, implementation works and is largely tested, adding some eval stuff.