[vinh] refactoring packages
[vinh] bit of a mad refactoring