Refactored Java Binary Search.