A complete rewrite of Smith