Added test code for Table
Table now throws IllegalStateException rather than NoSuchElementException when trying to end a scope that doesn't exist