Initial import of parsing code

Closes #1