CLEANUP: removed debug and out-commented code
ADD: extensive inline comments explaining what the heck is going on