Added cons and snoc with optional key