made number_machine into a singleton class

still not quite sure what a singleton is.  All I know is that it
restricts instantiation.