General cleanups

Unified some naming conventions and made things more consistent overall. More specifically...
* use `make_shared` where appropriate
* prefer range-based `for` loops when possible
* Added appropriate `const`.
* unified `s_` prefix for statics