closing parenthreses errors, minor code cleaning