Add test command to Makefile
Refactor to be slightly more readable