Refactored stuff. Nothing functional is different.