Commented

Comments and improved error reporting