Various cleanups and documentation changes