Edits to make code nicer