lots of changes, got database module working
lots of changes