Refactored more stuff.