cleanup of more code for platform selection