Fixes #19 (closed) by freezing all but the new top layers. Also renames functions to make it more obvious what's going on.