remove unused code
fix for ruby 1.9.3
remove debugging code
reorganize code slightly
fix addition for hashes with 2d keys