Depth support

supersedes #64 

note that I made #102 the target of this PR

/cc @petesiss