I wonder if you should move this to your OSDetection.js file or somewhere else that is reusable. The reason is that if we want to create another instance of PCP and not use this demo file, we'll need to re-write this part.