added license and more descriptive comments