Yet another mega refactor.

... fail.