cleaned up depth code
more cleanup