Fixed search functionalty; updated viewRecord() function to simply print pretty JSON.