Refactoring. Starting on a REST API structure.