Removed dead code causing warnings