Fixed early return caused by bad indent that was causing problems. Also, changed global variables to class variables. Some changes to to help fix short keys problem, still semi-broken for keylengths shorter than chars_to_check.
Merge remote-tracking branch 'origin/master'