Implement basic history search
Fix indentation issue