Reformat code and add proper license headers, also moved GPL license to resources
Exclude *.txt files from license header