fix first set of errors and code standards