Documented the code, added the license and added an example output