Removed duplicate code
Introduced AbstractConverter class