Refactored the huge overhaul