Written and tested bubble sort