oops, fix Content-Type
whitespace
deep copy not needed; shallow copy will do
comment
clean up code a bit