platform keys refactor