Put all rendering code inside card