Cherry picked changes of Sinaris' updates to make it MoP ready. Thank
you for the contribution.
Merge branch 'mop' - ready for 5.3 now