Fix EZP-22147: Use the template URI instead of manually building the URI with query parameters.
Fixed various CS issues