Great work, and quite a brain twister. I managed to beat all the levels, despite having to restart the final one many times.