Add test runner to makefile. Fix bug with closing messages.