removed some errors and code inspection's