More style fixes and cleanup of headers.
Copy the int value instead of using a memory object.