Improving tests and Makefile