More tests & some fixes.