Suggested updates: avoid code duplication in retrieving platform type