Better algorithm. Could probably improve the algorithm more, should definitely make UI better.