Made a factory to build appropriate Atom