removed dead code from as_typed_vector, and added several examples