Add SimpleLiteral factory (and fix one unrelated unchecked warning)

review by @szeiger