Cleaned up parser a bit.