Removed identified redundancies in the code.

Removed identified redundancies in the code.