Adding post hooks
Added finalize() method in directives