Refactored a bunch
Refactored a bunch