Indentation
Rewrote error handling to exceptions