Use get16, get32, put16, and put32 instead of direct casting pointer