Minor edits to the code