refactored database layer to be a golang object - much less global variables now.
added getter stup for data export