adding difficulty utility call
major cleanup and refactor of bitname code