Fixed isBalanced

The second range should start at begin + first as the end is exclusive.
This led to the begin+first element beeing ignored.
Deletet debug and unnecessary tests