Import from bletchley repo

Bletchley repo has so many different subprojects it's getting
unmanageable, so I'm splitting some off.