Seeing if I can optimise the move atoms part of my code.