Added tests.

Also added makefile.