Fixed most of the reordering warnings
Merge pull request #646 from worktycho/warningfixes

Fixed most of the reordering warnings