 		}
 		return nil
 	}
-	
-	func updateDirection() {
-		if !needsToUpdateDirection {
-			return
-		}
-		pacmanSprite.removeActionForKey("Move")
-		func actionForDirection() -> SKAction {
-			let Delta: CGFloat = 25
-			switch (direction) {
-			case .Up:
-				return SKAction.moveByX(0.0, y: Delta, duration: 0.1)
-			case .Down:
-				return SKAction.moveByX(0.0, y: -Delta, duration: 0.1)
-			case .Right:
-				return SKAction.moveByX(Delta, y: 0.0, duration: 0.1)
-			default:
-				return SKAction.moveByX(-Delta, y: 0.0, duration: 0.1)
-			}
-		}
-		let action = SKAction.repeatActionForever(actionForDirection())
-		pacmanSprite.runAction(action, withKey: "Move")
-		needsToUpdateDirection = false
-	}
 }

				if p.y < -s.height {
					node.position.y = self.size.height + (s.height / 2)
				}
				if needsToUpdateDirection || NSDate().timeIntervalSince1970 - lastChange > 0.25 {
					if let path = wasClosedPath ? openDirectionPaths[direction]?.CGPath : closedDirectionPaths[direction]?.CGPath {
						node.path = path
					}
					wasClosedPath = !wasClosedPath
					lastChange = NSDate().timeIntervalSince1970
				}
				updateDirection()
			}
		}
    }

	}
   
    override func update(currentTime: CFTimeInterval) {
        if let nodes = self.children as? [SKShapeNode], swac = swacman {
			for node in nodes {
				let p = node.position
				let s = node.frame.size
				if p.x - s.width > self.size.width {
					node.position.x = -s.width
				}
