Add and update tests, documentation