Moved some logic around, nothing to see here.