Added card layout, fixed minor bugs