Added TODO: we should think about this rank() call more.
Code style fixed (issue #177)