Big update and cleanup.