Hide empty cells

Modified the code for the stack view to hide cells that have no content
in them.