Effect of contaminations and surface preparation on the work function of single layer MoS2