several small fixes, adding cubing