Refactor robust mlogoregr