Added search by reference

Also added an option to search all files by default. Fixes #57 and #53.