Code rewrites. Started paper.