changed depth to Infinity, misc code formatting