code cleanup after code analysis