Refactor dane into a private module