Refactor Rest specification
Rename packages
Minor refactoring and produce tests