Some bugfixes, updates to README.md and HISTORY.md