Removed some code causing warnings