Finished the move atoms code.