Math ops refactors