image refactor, and delete unused messages