Some documentation and cleanup
Remove unused code