Removed redundant function and changed the respective function calls. Retested.