Refactored more stuff. weee.