Refacor command class