Updated calculator class