Make web version work offline and split out chrome app code