massive reorganization to main package and subpackages