Updating database loading code