Reorganised implementation