code refactor and cleanup
using rootshell instead of new su request for logservice
[Bug] Save the rules before apply rules- this eliminates when user directly using profiles