Improved error handling.
Added unit tests.
Merge branch 'master' of git@github.com:software-engineering-amsterdam/poly-ql.git