Re-worked the parser a bit.