Platform visibility working
Refactored platform visibility code