Rewriting and stuff
Also splitting out stuff