#396 Removed commented code
#396 Moved getting headers to separate method