Added new custom headers, refactored log()