Completed search method

Just about ready.
Added API docs