diff --git a/README.rst b/README.rst
index 025d8089759cf4fa2def171904e80dd40736243d..a626dcb8c865002eac2205a0f9525795af0f6b8d 100644
--- a/README.rst
+++ b/README.rst
@@ -105,7 +105,13 @@ Once you have a copy of the source, you can install it with ::
 
     $ python setup.py install
     
-    
+
+
+Jupyter Canvas Widget
+---------------------
+If you work with jupyter notebook you need to install the Jupyer Canvas Widget. To install the Jupyter Canvas Widget read also
+https://github.com/Who8MyLunch/Jupyter_Canvas_Widget#installation
+
 Usage
 =====
 To use flatland in a project ::
diff --git a/examples/demo.py b/examples/demo.py
index fb7196bdaef41ed36d2e190860678302209fae69..fa897713e1987082ffecf1b1bc824d1329c44342 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -163,8 +163,8 @@ class Demo:
     def run_complex_scene():
         demo_001 = Demo(Scenario_Generator.load_scenario('complex_scene.pkl'))
         demo_001.set_record_frames(os.path.join(__file_dirname__, '..', 'rendering', 'frame_{:04d}.bmp'))
-        demo_001.run_demo(360)
-
+        demo_001.run_demo(120)
+ 
 
 if __name__ == "__main__":
     Demo.run_complex_scene()
diff --git a/flatland/envs/env_utils.py b/flatland/envs/env_utils.py
index cc4a0015601d0f5820cccb25b6076a0a92f67915..8ee120a45f56c08c568a1f8440061a718f78f5cd 100644
--- a/flatland/envs/env_utils.py
+++ b/flatland/envs/env_utils.py
@@ -291,6 +291,18 @@ def distance_on_rail(pos1, pos2):
     return abs(pos1[0] - pos2[0]) + abs(pos1[1] - pos2[1])
 
 
+def get_new_position(position, movement):
+    """ Utility function that converts a compass movement over a 2D grid to new positions (r, c). """
+    if movement == Grid4TransitionsEnum.NORTH:
+        return (position[0] - 1, position[1])
+    elif movement == Grid4TransitionsEnum.EAST:
+        return (position[0], position[1] + 1)
+    elif movement == Grid4TransitionsEnum.SOUTH:
+        return (position[0] + 1, position[1])
+    elif movement == Grid4TransitionsEnum.WEST:
+        return (position[0], position[1] - 1)
+
+
 def get_rnd_agents_pos_tgt_dir_on_rail(rail, num_agents):
     """
     Given a `rail' GridTransitionMap, return a random placement of agents (initial position, direction and target).
diff --git a/flatland/utils/editor.py b/flatland/utils/editor.py
index 81565d62d3ab17e740a5e1b635a97fd97d01980f..081cf02c804f5a8d64542b2cfdc75c664bc479a9 100644
--- a/flatland/utils/editor.py
+++ b/flatland/utils/editor.py
@@ -238,14 +238,20 @@ class Controller(object):
         bAlt = event["altKey"]
         if bCtrl and not bShift and not bAlt:
             self.model.click_agent(rcCell)
+            self.lrcStroke = []
         elif bShift and bCtrl:
             self.model.add_target(rcCell)
+            self.lrcStroke = []
         elif bAlt and not bShift and not bCtrl:
             self.model.clearCell(rcCell)
+            self.lrcStroke = []
 
         self.debug("click in cell", rcCell)
         self.model.debug_cell(rcCell)
 
+        if self.model.iSelectedAgent is not None:
+            self.lrcStroke = []
+
     def setDebug(self, dEvent):
         self.model.setDebug(dEvent["new"])
 
@@ -271,8 +277,35 @@ class Controller(object):
 
         # If the mouse is held down, enqueue an event in our own queue
         # The intention was to avoid too many redraws.
+        # Reset the lrcStroke list, if ALT, CTRL or SHIFT pressed
         if event["buttons"] > 0:
             qEvents.append((time.time(), x, y))
+            bShift = event["shiftKey"]
+            bCtrl = event["ctrlKey"]
+            bAlt = event["altKey"]
+            if bShift:
+                self.lrcStroke = []
+                while len(qEvents) > 0:
+                    t, x, y = qEvents.popleft()
+                return
+            if bCtrl:
+                self.lrcStroke = []
+                while len(qEvents) > 0:
+                    t, x, y = qEvents.popleft()
+                return
+            if bAlt:
+                self.lrcStroke = []
+                while len(qEvents) > 0:
+                    t, x, y = qEvents.popleft()
+                return
+        else:
+            self.lrcStroke = []
+
+        if self.model.iSelectedAgent is not None:
+            self.lrcStroke = []
+            while len(qEvents) > 0:
+                t, x, y = qEvents.popleft()
+            return
 
         # Process the events in our queue:
         # Draw a black square to indicate a trail
diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py
index 6c687667cc4fcc5dcd5035956af91b661e63b111..23f8b8790a44be3d4835a1a9594effaa1ee33164 100644
--- a/flatland/utils/graphics_pil.py
+++ b/flatland/utils/graphics_pil.py
@@ -433,12 +433,12 @@ class PILSVG(PILGL):
                         if (col + row) % 10 > 7:
                             pilTrack = self.dScenery[0]
                         else:
-                            if (col + row + col * row) % 2 == 0:
+                            if (col + row + col * row) % 3 == 0:
                                 a = (a + (col + row + col * row)) % len(self.dBuildings)
                             pilTrack = self.dBuildings[a]
-                    elif (self.background_grid[col][row] > 5) or ((col ** 3 + row ** 2 + col * row) % 10 == 0):
-                        a = int(self.background_grid[col][row]) - 5
-                        a = a % len(self.dScenery)
+                    elif (self.background_grid[col][row] > 4) or ((col ** 3 + row ** 2 + col * row) % 10 == 0):
+                        a = int(self.background_grid[col][row]) - 4
+                        a = (a + (col + row + col * row + col ** 3 + row ** 4)) % len(self.dScenery)
                         if (col + row + col * row) % 10 > 2:
                             a = 0
                         pilTrack = self.dScenery[a]
diff --git a/notebooks/Scene_Editor.ipynb b/notebooks/Scene_Editor.ipynb
index 551aedda042214fb797dcba6d3b12db6ec9dab64..444c1ebf023a06294b04f58a4f180a46608f6d96 100644
--- a/notebooks/Scene_Editor.ipynb
+++ b/notebooks/Scene_Editor.ipynb
@@ -100,7 +100,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "c96cefa474204cb1992da3eb286fb659",
+       "model_id": "140f16d2c9a643e39d68c6421e50b9bd",
        "version_major": 2,
        "version_minor": 0
       },
diff --git a/notebooks/Simple_Rendering_Demo.ipynb b/notebooks/Simple_Rendering_Demo.ipynb
index b05b791fea489f04767d7f1b31391838e21d34c2..8b13d860a020829609542e55f9088014ed4783b0 100644
--- a/notebooks/Simple_Rendering_Demo.ipynb
+++ b/notebooks/Simple_Rendering_Demo.ipynb
@@ -9,7 +9,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 1,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -19,7 +19,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 2,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -31,7 +31,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 3,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -41,7 +41,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 4,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -53,9 +53,22 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 5,
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "<style>.container { width:90% !important; }</style>"
+      ],
+      "text/plain": [
+       "<IPython.core.display.HTML object>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
    "source": [
     "from IPython.core.display import display, HTML\n",
     "display(HTML(\"<style>.container { width:90% !important; }</style>\"))"
@@ -70,7 +83,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 6,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -92,9 +105,18 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 7,
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Illegal target rail: 3 13 0001011000000001\n",
+      "Illegal target rail: 5 13 0100000000000010\n"
+     ]
+    }
+   ],
    "source": [
     "oRT = rt.RenderTool(env,gl=\"PILSVG\")\n",
     "oRT.renderEnv()\n",
@@ -103,9 +125,24 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 8,
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "application/vnd.jupyter.widget-view+json": {
+       "model_id": "6f5c066c7dff47dbb3d2bfc1f9e77943",
+       "version_major": 2,
+       "version_minor": 0
+      },
+      "text/plain": [
+       "Canvas()"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
    "source": [
     "jpy_canvas.Canvas(img)"
    ]
diff --git a/setup.py b/setup.py
index 72e19e3ce79adeafdc2034a42633d940e9d4c98e..c11b99ffc07632eb7fb7507c8e811fd382ede045 100644
--- a/setup.py
+++ b/setup.py
@@ -20,21 +20,21 @@ if os.name == 'nt':
     is64bit = p[0] == '64bit'
     if sys.version[0:3] == '3.5':
         if is64bit:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp35-cp35m-win_amd64.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp35-cp35m-win_amd64.whl'
         else:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp35-cp35m-win32.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp35-cp35m-win32.whl'
 
     if sys.version[0:3] == '3.6':
         if is64bit:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp36-cp36m-win_amd64.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp36-cp36m-win_amd64.whl'
         else:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp36-cp36m-win32.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp36-cp36m-win32.whl'
 
     if sys.version[0:3] == '3.7':
         if is64bit:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp37-cp37m-win_amd64.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp37-cp37m-win_amd64.whl'
         else:
-            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.0-cp37-cp37m-win32.whl'
+            url = 'https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/pycairo-1.18.1-cp37-cp37m-win32.whl'
 
     try:
         import pycairo