fixed unit tests and got code mostly working with devel

author: nhhughes