Add some useful functionality
Instead of field f now use field thief to find the head.
Merge branch 'master' into ri