Improve documentation and targeted tes