Refreshed code for Directives