I've cleaned this up. I'm not a regular java coder so getting the options from an XML file is a bit beyond my abilities.