Restructuring

Restructured and refactored three templates into one. Added tabs for
permission based ruling.