Interfaces and error handling

Pulling some parser interfaces out into a parent package, and adding
error checking to table construction.