much improved rules rundown. Removed nesting!!
code analysis clean up