Fix headers method to return headers

Fixes a bug where headers were not displayed. Instead of returning the details hash return the actual headers. Adds a test case to prove it works too!