Big ol' refactor before v2.0