Changes to make common code work better with a private script of mine.  These changes shouldn't effect common functioning.
Adding sample to sample dict