More improvemets in search, cursor and folding