Some corrections. Note to self: don't copy blindly.