more changes. more cleanup. first approximation to textual search