Cleanup and documentation. Release candidate 1