Errors via Exception. Refactoring and other fixes