Implemented NSCoding on pen and eraser