DATAREST-227: Clean up patch based on feedback