Refactor QuantifyMe.db