bug fix partial byte ranges; add test for put/get number strings
add some comments and make code more readable