Refactor statics

Finally happy with this rewrite, and ready to start breaking up bigger, more complex tasks.