General cleanup and minimalization.