Refactor diondex to clean up code and reduce complexity and module usage
Merge branch 'rubocop_cleanup'