amirite: improve error reporting
test: simplify code