Refactored some more.