Atom hierarchy refactor