Bubble Sort: refactor