Updated to use actual header names for future reflection
Major refactoring for handling API request parameters