Refactor the way we detect the presence of the Tonic module

It's ad-hoc and messy currently