Small amendments to the code.