Update ImgManager Class and imgTools.js. Add Db Class.