More work in progress.

Not sure about this Java config stuff