added pointer offset, cleaned up more unused junk