Minor changes to task processing, some helper classes added