Adding old updates that I forgot to commit, to reflect exactly the code used for the xldb-demo