Merge pull request #133 from lowjoel/various-refactoring
Various refactoring changes

(main@4a9ab91ea7d523ed1e53312fc02901d073e704d4)