Paper and code

Nearly finished draft of paper. Codes relate to each piece of analysis.