Cleaned up error handing