Removed built-in event dispatching from task API. Added missing copyright headers. PMD driven code improvements