Rework serial query creation in parser. This addresses issue #9.