Tighten up parser code a bit