Updated Template.cs with improved code and fixes

Added updated Binary Pattern Match function by wieschoo. Optimized BPM. Optimized class. Fixed documentation and input parameters of BPM due to a little mistake causing an error.
Merge pull request #10 from darkunited/patch-2

Updated Template.cs with improved code and fixes