I'm doing a lot of porting and refactoring at the moment. I've come to the conclusion that porting from a dynamically typed language to a statically typed language is an order of magnitude more difficult than doing the reverse.
Refactoring is an interesting game. There are some very easy refactorings - especially with the toolsets available to us nowadays. However, there are some extremely difficult refactorings. I've found the most difficult to refactor methods have one or more of these 3 aspects:
1) It has long methods (>40 lines)
2) The method shares a variable for different things
3) Loops do more than 1 thing
1) causes 2) - so eliminating 1) means that 2) doesn't happen.
I sure wish the NextBigLanguage has an upper bound on the lines/method it can parse.