Adjustments

Tweaks, code cleanup to conform to IDE analysis.