Draft implementation of offline client and basic test coverage