Documentation and various fixes.