Fixed return data types, refactored code for readability, removed response headers.