Static thread access concept

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