Added "manual" and "auto" build funcs to db module