Use database for clients

I've removed this for now. You should rebase your changes on my master.