Refactoring read/write handlers and pointers