Re-arraged things to make more sense