Created Queue class, adjusted unit tests and cleaned script smart_dispatch.py