refactor scalar displacement to make it readable and sane.