Only write license if the regex matched
Use coffee script ranges instead of substring
Greatly improve dynamic generation of comparators