modifications to make various parts of soil more reusable/extendable

probably easiest read commit-by-commit, mostly moving stuff around.