use privacy level variables instead of hard coded integers
refactor the stream scope

create a class method with the same functionality
move all of the security_sql related sql strings into a new method
use the stream class method instead of the scope