Refactored more inefficiencies