minor doc fixes, some new arithmetic functions, some new tests