search functionality and indention fixes