Cleaning inconsistencies and adding final chip code