Updated doc & added tests