added parsers for primitives, and some more cleanups.