Complete the smart.json
Use apply to pass arguments to subscribe handler.