Massive reorganization. Also a Makefile.