change to use netty, include config changes, refactor code