Reduce redundant code in platform assignment
Merge pull request #16 from HalosGhost/master

Reduce redundant code in platform assignment