Some linting and coherence changes. Moved getting references into its own function from the ReasonImagePlugin constructor.