License fix, redundant code issues fix.