WOW! Great code.
However, split the 40-lines method. Use extract method.