Mega refactor
Refactor. Harder.