Added testing class and fixed bugs with distribution plots.