a few code style changes
Notes for changes added l 14, 21-25
fixed suggested query for determining if user has permission to search for contacts or not
Added security patch