Refactored to use tungus (mongoose for tingodb)