Multiplatform refactor