Better detection of cores and removed reference to own folders