Database almost works