Optimized Bubble Sort, Added TypeHandler class