refactor bank and creditcard application