Static thread access concept

As promised in #2 (yes, a few hours too late...), here it is, in a fully commented version.