multiple minor additions and bug fixes