add reconnect support
cleanup all the startup scripts
add test suite for converter
refactor the code