Clean some parts of the code