Change algorithm

Now using que to go trough all nodes and thus removing litmi from stack
size. There is however limit from que data type - unsigned short (65 535)

Now waves start at dragged element if present.