refactored class to interface and lucene implementation. working on #4