Put platform-dependent and PI code in their respective files