Offline mode. Sorta

Code needs a lot of refactoring