Break out panel type functions
Remove dependence on saved object from doc-table directive
remove unused variable
remove unused function
Add a few simple tests