rules view and templates restructured