Add SimpleLiteral factory (and fix one unrelated unchecked warning)

review by @szeiger 
unrelated unchecked warning fix