code cleanup/simplification and implementation of IDs for Tasks (incomplete)