Rewrite Makefile to clean it up.

Also simplified the directory structure a bit.