Fixes and improvements.
tail commit.