Add loop testing and a new 'test' for makefile.