Added support to filter IPs by tenant_id

RM6299

Fixed some spacing issues

Used_by_tenantid working now