change result type for directives from List[Element] to Element
Change signatures in directive APIs from String => T to String =>
Either[String,T] to allow for error handling