Extended sorting algorithm
Added stuff. Program now either crashed from address reading error or loops infintely. We should probably have a look at that.