refactor 0.1.2 Indi/Db* converted from shitcode