Removed redundant code, improve performance

closes #10535