Query builder cleanup.
- Moved colon processing to more logical location
- Removed unreachable range generation code