Code cleanup of DependencyListener and TaskListener
Minor fix in servlet3 template