Implement Vector library as template