Complete rewrite to v2