Completed parsing code. Untested and likely buggy, but the bulk of that work is done.