Add pointer wrappers and some validity checking