Great Database API refactoring and stuff

Made a new Database API and implemented a XML file backend for it.

Now you.