change results formatting, look inside bbox first and then outside for result ordering, correct some bugs