clean code

add types_test.go
add phraseheap.go
add phraserange.go