Code cleanup, threading bug fix, and added comments.  Old code removed for readability - Crypt0s