   else
     $.ajax({ url:"/graphs", type:"POST", dataType:"json", data:encodeData })
 
-getCurrentEntities = () ->
+getCurrentEntities = ->
   entities = []
   $("div.ui-dialog").each (index, element) ->
     entities[index] = {}

    entities[index].attrib = $(element).find("textarea.attributes").val()
  entities

getCurrentRelationships = () ->
  relationships = []
  # Add parameterization code here once relationships are implemented
  relationships

getSettings = () ->
  settings = {}
  $("#settings").find(".field").find("input,textarea").each (index, element) ->
    setting_name = element.name.replace("graph[","").replace("]","")
    settings[setting_name] = element.value
  settings

graphID = () ->
  window.location.pathname.split('/')[2]

addRelationshipsToDOM = () ->
  for relationship, index in window.relationships.length
    paths = paths + '<path id="relationship' + index + '" stroke="black" stroke-width="2" fill="none" />'
  
  $('#relationships').html(paths)

$(document).ready ->
  $(".entity").each (index, element) ->
    entity_width  = parseInt( $(element).attr("data-width"))
    entity_height = parseInt( $(element).attr("data-height"))

saveGraph = ->
  graph = {}
  graph.entities = getCurrentEntities()
  graph.relationships = getCurrentRelationships()
