Feature/offline mode

see comments in the third commit