Fixing misplaced 'subject' in non-test code
Adding basic tests (and pending for known issues)