Changes: some code optimisation.