Improvements for API templates