Refactor validArchitectures