reduced dependency to basedir call + head close tag and body open tag fix