Refactored some more shit