Atom-shell stuff, also, some bug fixing