def add_lib_element(type, value, front = false)
      elem = [type, value.instance_of?(String) ? value : value.name]
      if front
        lib_elements.unshift(elem)
      else
        lib_elements << elem
      end
    end
def add_lib_element(type, value, front = false)
      elem = [type, value.instance_of?(String) ? value : value.name]
      if front
        lib_elements.unshift(elem)
      else
        lib_elements << elem
      end
    end
value: can be string or building block