Fix up some of the shotty hackathon style code