Moving the whole thing into a wrapper class, delegating functionality to methods