Added HEAD,OPTIONS and TRACE

* Changed code to dynamically generate the functions instead of hardcoded defs