Updated some documentation and cleaned up unused code