Removed redundant function, updated usages