Initial string swapping and code tweaking.