changes detection of img.frame to use values defined on model
removes deprecated code