As well as some comments to the code.