refactoring of server funcitoning. Remodeled DB, updated post/get messages accordingly