Remove appcache from the app and refactor appcache code in gulpfile