exposing sendMessage and phantom to templates