[wip] Refactoring of api/v2/pe_controller