Removal of unused artefacts and code alignment