Changed visibility of table and scan to protected