Refactored and stuff