fixed reflection warning and cleaned up some Java package names

Added type hint XMLInputFactory for a reflection warning on calling .createXMLStreamReader (line 339).

Also cleaned up some long package names by adding the referenced classes to imports.