refact message class to common package
refact package structure