Reorganize code more naturally for direct installation, and fix dotzee.sample generation