move Task class variables to instances, fix #3