Refactoring & AlignToMemberReferenceDot feature.

Mostly moved some logic around, not much better but hopefully it'll
slightly be easier to maintain.