Working DB

database kind of works now.  needs some cleaning up.