Bug fixes and small updates