Starting huge rewrite. Fun!