refactor out read / write string from ringbuffer.
add hashmap implementation.