Refactor + configuration
Api documented