fix reflection warning and cleanup 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.