[task] code cleanup and adding license header