Merge "Fix rotation crash, minor cleanups" into ub-calculator-euler