Refactors for reek & flog