Add widget logic and offline support
Fixed reference for files