Added additional tests and fixes.