Added a function that will flatten an arbitrarily-nested list of Atom objects.