Brain probe code simplification and comparison relationship

Fix some of the briancode logic and simplify the underlying code to be
more readable.
Move to fixing the rotations

see summary