Added a query method and worked more on BasicSearch.java.