Added processing directives functionality. not completed