Reorganised and cleaned up