refactor app from utils, autofit without flash
refactor app from utils