Minor optimisations and refactoring