Performed code analysis on TS plugin, a variety of GetTickCount64() shou...

...ld be used instead of GetTickCount() due to overflowing every 46 (I think) days.

buffer was allocated with new[] and deleted via delete instead of delete[]
There was bitwise operations going on instead of simply doing AND checks.

I understand I am perhaps getting slightly out of my depth in terms of tackling C++ but perhaps these slight changes could avoid potential issues.