Added comments, refactored Literal, blank Hadamard and unoptimized difference