Some code moved around