Improves exception handling
Removes legacy TODO comments