Add a wrapper struct to preserve exception
Add comments for definitions