Performed code analysis on TS plugin, a variety of GetTickCount64() should 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.
Merge pull request #576 from CorruptedHeart/CodeAnalysisChanges

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