Bug fixes and changes for clarity