small cleanup in ptr binding
more structure and ptr binding cleanups