Cleaned up some code and added s1 outputs to make re-running easier.