Cleaning up the code thus far, fixed a few typos before they get out of control...
Will told me that dividing by 2 will fix the overcounting issue.