cleanups, comments, bug fixes, overall improvements

first of many PRs as i code review this project