Anti-roll code update

Still not totally happy with it, but vastly improved.