Incorporating Jed's suggestion of improving the handling of const in the typedefs.