Some improvements

- use MIT licence instead of GPL
- rename 'CMDir' to 'cmDir'
- some comment updates