Refactor file organization, and add offline mode using local storage