Made more cross-platform compatable