First refactoring step for cards map

Not complete !