Refactor cardview