Documentation and Code Cleanup