Atom parser and writer