Database objects

Also added card and group objects. Very basic for now.