Summary: Refactors the headless to have a list of closures instead of the `if` conditions. This will make addition of new arguments easy as it will be just adding a new closure to the list. One can change the order of the execution of the closures by inserting it at whatever index the user wants. Reviewed By: passy Differential Revision: D15965142 fbshipit-source-id: e9f348fe9d9011adcd47d140713d6187eab3b3d3