Extract code from ticket and replies controllers