Cleaning up code in REST section examples