     @connecting = false
     @buffer = []
     @container = null
+
+    # MicroFlo things
+    @transport = null
+    @microfloGraph = null
+    @debugLevel = 'Error'
+
+    @on 'connected', @updatecontainer
+
     super definition
 
   getElement: -> @container

    graph.on 'changeProperties', @updatecontainer
    super graph

  connect: ->
    unless @container
      throw new Error 'Unable to connect without a parent element'

    # Make sure serial transport is closed before reopening
    if @getSerial and @getSerial()
      @getSerial().close () ->
        #

    # Let the UI know we're connecting
    @connecting = true
    @emit 'status',
      online: false
      label: 'connecting'

    # Set an ID for targeting purposes
    @container.id = 'preview-container'

    # Update container contents as needed
    @on 'connected', @updatecontainer

    # Setup runtime
    # TODO: remove hardcoding of baudrate and debugLevel
    baudRate = 9600
    debugLevel = 'Error'
    address = @getAddress()
    serialPort = address.replace 'serial://', ''
    @setupRuntime baudRate, serialPort, debugLevel

    # HACK: sends initial message, which hooks up receiving as well
    @onLoaded()

  disconnect: ->
    onClosed = (success) ->

        label: 'disconnected'
      @emit 'disconnected'

      if @transport
        @transport.close onClosed
      else
        onClosed false

  updatecontainer: =>
    return unless @container
    # Set an ID for targeting purposes
    @container.id = 'preview-container'

  send: (protocol, command, payload) ->
    msg =
