License fixes, redundant code modified, fixed access to modified closure, code improvements, etc.