lots of changes for fresh approach
filemode changes and added hash hug parsing in leaf-body