1. Refactoring. 2. Improve img support.