Better import parsing.

Closes #11