TODO Add an optional validity check to detect llic methods being called in a sequence which would produce invalid output. More output types? C/C++ implementation?