Rewrote hasMany - hasMany function again.
More rewrites.
More fixes for deleted state bug.
Fixed module ordering bug.
Rewriting world's longest function.
One section left.
Done rewriting function.