Preliminary refactoring

I need to separate a little markup engine from the crawler code in order to insert jpeg engine into.
This change don't seems to break anything, and is only code move.