What I have in the PR is mostly quick hacks and improvement suggestions based on earlier experience with emails processing... 
So, yes, please rearrange and improve.