unit_rotate3 added. Code cleanup.