Reorganise, move vars to top