Qual: Uniformize code and fix a ton of bugs.