Change tools to accommodate mac users

This pull request also consists of the debugging of some previous changes weeks ago, which includes some back and forth that is confusing for reviewers. And some of these contents are highly likely to change in the future, since this is just one step towards a more systematic syntax. Anyway, they should be fine because no failure is added to tests. So Denis, I only count on you to review the change of tools to accommodate mac users.