Added Java based configuration and removed all XML.