Added implementation based on new design and verified with sample files in 'vector'.