Minor edits to code