many changes: working on offline functionality, added ui directives