Header logic added and cleaned up owin context constants