Rewrote getAtomStackFromString. (modularity & error handing)