 define ["app", "apps/config/storage/localstorage", "entities/playlist"], (Swabcast) ->
   # Generated by CoffeeScript 1.6.3
   Swabcast.module "Entities", (Entities, Swabcast, Backbone, Marionette, $, _) ->
-    API = undefined
-    initializePlayerDataSyncData = undefined
     Entities.PlayerData = Backbone.Model.extend(
-      url: "player"
+      id:0
+      urlRoot: "player"
+      url:"player"
       currentPosition: 0
       validate: (attrs) ->
         errors = []

        playerSaveData = new Entities.PlayerData(id: 0)

    Swabcast.reqres.setHandler "player:savedata", ->
      API.getPlayer()

    Swabcast.commands.setHandler "playerdata:remove", ->
      API.playerReset()


    API =
      getPlayerData: ->
        playerSaveData = new Entities.PlayerData(id: 0)
        defer = $.Deferred()
        playerSaveData.fetch
