More improvement tweaks

Modified problem 50 to use a binary search, this has results in
substantial performance improvements