Refactor code for Validate Credit Card