Card creation fixed and refactored