Added functionality to add a class to $this to see whether it has ocntents