Removal of redundant function

Removal of redundant lines and functions