modified layout, added readlink and rename, fixed other stuff