Splitting into classes so the config is cleaner, adding lucene check

Change-Id: Iba7888a06f5266f54e5dc0dac4ffbd11f867c396