Refactor package structure

This pull request simplify the package structure of product and test. It integrates API and internal classes, and reconstruct model classes.