Cleanup all code for consistency, and clarity.

I had these declarations here so there wasn't any unnecessary memory allocations if the cached `typeAdapter` was going to be served up. But as I noted in another comment this is probably not going to matter because of minifications