General documentation and cleanup