Revert "Some optimisations"

This reverts commit ca22d815d94961661c55431e4e7109bb97c68359.