Math cleanup