Finalized server and database functionality