Big refactor
Update Makefile
Full test and abstract base classes