Refactor Search class, break other things, fixes #67