Moving calculator definition to its own class.