Cleaned up sorta and in process of getting db working