Change $instance to $this in views