Updates model metaclass to be py2/3 compatible