Made a number of improvements and simplifications. Added the box visualization and a test program.