fixed bug in setting relative path
improved management for paths and entity identity, fixed bugs