refactor app, add cache control for static