[Fix #1] Add onEnd callback when commands are executed

Adding a callback on the end of the commands as @willemvb suggests it.