Added more options to modify skeleton, added another state variable only_root.