Backported deque, fixed setup.py and included original sources