refactor: Trying to modularize before this gets out of hand