Remove trailing nl
Add some tests for extract