Fix offline functionality

Using JSON now