Moved things around to make it easier to read