Implement offline mode. Closes #1241
Merge pull request #1364 from pejakm/wof

Implement offline mode. Closes #1241