Add several utility functions on vectors