Speed optimisations for operator evaluation. Small changes to utility functions.