code cleanup + dslr rules