This update contains my recent failed attempt at debugging.
Cleaned up my code a bit, getting ready to try a new idea.