Initial refactor to create image card directive