Small refactor in mono support.