Actual parsing could even be moved into this code since we never use the parser anywhere else.