Thanks.

I got it working with the help of some members of Gamedev using deque.

Kuphryn