add licence(s) and code comments