New tests added.
Old bugs fixed.
merge.