Improve documentation of entities. General cleanup.