Computes x correctly.
Add comment.
Cleanup.