Made a few changes, as suggested by NY.