Finished first version of the database functions and ticket server, currently a draft and untested. All the functions are in place except for the methods pertaining to making and retrieving replies.

The test cases are expected to produce plenty of errors at this point.