New API for client. Substitute as a class instead of static function.
Documentation and tests for the new API
Version bump 0.4.0