Put the "calculations" into a class