Altered header configuration
Added allocation folding to the optimization pass
Added if-else statements
Cleaned up the branching code.
Significantly enhanced the code generation and comments.