add some unit tests and make JsonClient more robust
Small refactoring. Pepare lazy loading in pages