Reworked searching, rebalanced values.