finished structure for arbitrary document mapping onto histogram space
code cleanup and additional documentation for handoff