Rewrote everything, made it work correctly.  It's fully functional now, but I'll still be playing around with the interface for a while.