Switch from which to hash and remove subprocesses

Switched from `which` to `hash`. (`hash` also adds the entry to the hash table which speeds up later calls).
Dropped subprocesses `$( ... )` and conditions `[[ ... ]]` which improves performance (all commands are done in the same process)
Suppressed error messages (should the command not be found) with `&>/dev/null`

Of course, if any of this is bad, please tell me/don't merge. :)