Refactoring the dotnettool (#231)