significantly simplify makefile
fix virtual destructor issues original code was having