refactoring, license headers, commenting