Moved a lot of stuff to a Makefile

I still need to make a installer webpage to do other stuff, like setting up the
database and the initial data directory structure