Remove use of contextpy

This closes #17.
Simplifies the code a bit and makes things more explicit.

Signed-off-by: Stefan Marr <git@stefan-marr.de>