Add rehash hook, move ls++ to local