Spacing and some logic cleanup.