Uncommented cse optimisations - they seem to work ok.