Integrate guard, thin and turn as per issue #2

See issue #2 for details.