small optimizations, add const pointer constructor