Refactoring & upgrading

Pulled out interfaces and concrete classes; upgraded to Lucene 4.8.