Change order of source code to align with platforms