Use of command pattern to ease decoupling