WIP
Ouch. Big commit