did some refactoring and am getting started on complex security rules.