JS1k: Making a very small game in JavaScript part 2 - optimisations