renamed core file
Little refactoring of position calculation code