Lots of bug fixes (see history.txt)