Edited models to be compatible with older Python versions