General cleanup and modifications

**Work-in-progress** - please do not merge. Compiles and builds but still need to test it. Just opening the PR to start the discussion...