Overhaul server-side system code to pull from database