Completed statsTable directive, but there is more refactoring to be done.