very unstable, work in progress to achieve offline functionality. Uploaded just to avoid merge conflicts later on