Update: refactored some more