Remember when I actually used to write code?

Me either

(Code cleanup number 483)
Separate layers into structs

Protip™: write code right the first time