Changed Makefile, implemented tests