Complete rewrite, not using dep packaging any longer.