Reorganise the code again.