Refactored some more