Adding license file
Refactoring - don't duplicate code