Errors check included and comments updated