Removing unused directives
Added guardian mode support