Renaming randomPos to random-pos, reordering logic/core