Moved some things aroound to make them make more sense