add TaskContext, standardize class names
Python 3 compatible