Support new apt module and reorganise.