Converted length_distribution_test to unittest and rearranged fold