Cleanup of the code