Use a real Error; rename some variables/methods