Fixed static analyzer's issue with non used variable. Removed dead code.