Removing unneeded commented code
Improving error messages.