Made code JSLint compliant + fixed missing radix issues with parseInt()'s.
Cleaned code: removed dead, commented-out and debugging code. Confirmed JSLint compliant. Added helpful comments.
Cleaned code: Added helpful comments.