Refactor, split up depth module