work on codesmell - eliminated some warnings