make TT_USER > TT_ERR, remove TT_MAX

Thought I'd make this little change an independent branch.
Also, including unit test! \o/

The test is most probably most pointless but at the very least I can chalk it up as getting to know the testing framework better.