Better configuration, memoize model_classes, fixes specs