Made some cosmetic changes to the code.
Added rearrangement of filters in FilterChain.