Updated to drive content from stored proc rather than code.