- Replaced asserts with exceptions