Adds some code optimisations