Improved recognition algorithm
Upgraded windows script