Clean up
Add basic corpus functions