added makefile and refactored tests into separate directory