Tidying up ethernet code