NAWQAAN-207

* Wrote some tests
* Even caught a bug