cleanup of the code