Refactor draft.clj to have more clearly defined scopes for functions.

The decoded msg are pre-processed first to expand it with additional
information which facilitates the subsequent XML conversion. The actual
conversion operation is taken out from the let binding to favor a chain
operation with threading first macro (more lispy).