Refactor code
Remove duplicated library
Extract packet config file