Multiple math-related changes