Use singleton pattern instead of passing in Calculator attributes