Minor fixes

Change documentation style, add test for search(), remove unused
variable, remove trailing whitespaces