introduced guava, fixed npe's and refactored the provider handling