sub Main(launchParams)
    ' Indicate this is a Roku SceneGraph application'
    screen = CreateObject("roSGScreen")
    m.port = CreateObject("roMessagePort")
    screen.SetMessagePort(m.port)

    ' Create a scene and load /components/iptagger.xml'
    m.scene = screen.CreateScene("IPTagger")
    screen.show()

    ' Just to test various ECP params
    print "Launch parameters:"
    for each key in launchParams
        print "  " key "=" launchParams[key]
    end for

    while(true)
        msg = wait(0, m.port)
        msgType = type(msg)
        if msgType = "roSGScreenEvent"
            if msg.isScreenClosed() then return
        end if
    end while
end sub

