cleaning up code analysis issues
added trace and options
added trace and options