Reorganised template and generation files