Adding tests, javadoc, license headers + small refactorings (e.g. leverage getSearch() from base class)