Updated documentation. Removed unused code.